<template>
	<view class="container">
		<view>
			<desc-wrapper :title="title" :desc="desc"></desc-wrapper>
			<z-card title="基本信息">
				<block v-if="resp">
					<view class="card-content-item">
						<text class="card-content-label_left ">缘主姓名:</text>
						<text class="card-content_right card-text-red">{{resp.base_info.name}}</text>
					</view>

					<view class="card-content-item">
						<text class="card-content-label_left ">出生公历:</text>
						<text class="card-content_right">{{resp.base_info.gongli}}</text>
					</view>
					<view class="card-content-item">
						<text class="card-content-label_left ">出生农历:</text>
						<text class="card-content_right">{{resp.base_info.nongli}}</text>
					</view>
					<view class="card-content-item">
						<text class="card-content-label_left ">缘主称骨:</text>
						<text class="card-content_right">{{resp.chenggu.liang}}两{{resp.chenggu.qian}}钱</text>
					</view>
				</block>
			</z-card>
			<z-card title="称骨论命">
				<block v-if="resp">
					<text>{{resp.chenggu.description}}</text>
				</block>
			</z-card>
			<view class="bottom-btns" style="transform: translateY(-100%);" @click="todashi">
				<view class="start-btn">
					<text>大师详解</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: '称骨论命结果',
				desc: '本次测算结果仅供娱乐使用，请勿用于封建迷信和违法用途。',
				resp: null,
				// keymap: {
				// 	name: '姓名',
				// 	age: '年龄',
				// 	gongli: '公历',
				// 	nongli: '农历',
				// },
				// keymap1: {
				// 	total_weight: '缘主称骨',
				// 	description: '批示',
				// },
			}
		},
		onLoad(opt) {
			this.resp = JSON.parse(opt.params)
		},
		methods:{
			todashi(){
				uni.switchTab({
					url:'/pages/tabbar/service'
				})
			}
		}
	}
</script>
<style lang="scss" scoped></style>